I have heard from several people that the date for
many of my scripts is causing 501 errors and messing
up the scripts. This seems to happen the most on Sun
OS machines, and the problem seems to be that there
are a couple of characters that the version of date
you are running does not support. Specifically the %A
and %Z options. If you are having problems with the
date, try one of the three options below:
- This one usually happens on Sun OS machines:
Change
any of the commands and lines that contain
something similar to:
$date = `date +"%A ... %Z"`;
so that they no longer have any %A or %Z
attributes in them.
- Another possible problem is that you are
using the default cgi-bin on an NCSA server
or another web server that comes with a
pre-made cgi script called 'date'. This can
cause problems if you do not set your script
to point to the unix date command. To find
out where that is, type this at your unix
prompt:
which date
That should give you a path to the date
command.
- The third and final possible problem could
arise if you are not using a Unix machine to
run these scripts on. This is often where my
scripts fail on other machines. I have heard
from many people that the following will fix
it:
At the top of the script just beneath
the #! line, put the following
statement:
require "ctime.pl";
Then wherever you see the $date variable
being defined, substitute it for:
$date = &ctime(time);
Hopefully one of the above solutions will help to fix
any date problems you may be having with my scripts.